<!doctype html>
<html lang="en">
 
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>纯css实现奥运五环</title>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }
 
        .outer {
            width: 500px;
            margin: 100px auto;
        }
 
        .bottom-inner {
            margin-top: -36px;
            margin-left: 32px;
        }
 
        .box {
            width: 50px;
            height: 50px;
            border: 5px solid;
            border-radius: 50%;
            display: inline-block;
            position: relative;
        }
 
        .box::after {
            content: "";
            width: 50px;
            height: 50px;
            border: 5px solid;
            border-radius: 50%;
            display: inline-block;
            position: absolute;
        }
 
        .blue {
            border-color: #2196f3;
        }
 
        .blue::after {
            border-color: #2196f3;
            border-bottom-color: transparent; /*利用下边框色为透明，实现该部分被遮挡效果*/
            z-index: 1;
            top: -5px;
            left: -5px;
        }
 
        .black {
            border-color: black;
        }
 
        .black::after {
            border-color: black;
            border-left-color: transparent;
            z-index: 1;
            top: -5px;
            left: -5px;
        }
 
        .red {
            border-color: red;
        }
 
        .red::after {
            border-color: red;
            border-left-color: transparent;
            z-index: 1;
            top: -5px;
            left: -5px;
        }
 
        .orange {
            border-color: orange;
        }
 
        .orange::after {
            border-color: orange;
            top: -5px;
            left: -5px;
        }
 
        .green {
            border-color: green;
        }
 
        .green::after {
            border-color: green;
            border-top-color: transparent;
            border-right-color: transparent;
            z-index: 1;
            top: -5px;
            left: -5px;
        }
 
        
    </style>
</head>
 
<body>
    <div class="outer">
        <div class="top-inner">
            <div class="box blue"></div>
            <div class="box black"></div>
            <div class="box red"></div>
        </div>
        <div class="bottom-inner">
            <div class="box orange"></div>
            <div class="box green"></div>
        </div>
    </div>
 
</body>
 
</html>